3.2.28 \(\int \frac {x^2}{\sqrt {-3-4 x-x^2} (3+4 x+2 x^2)} \, dx\)

Optimal. Leaf size=98 \[ -\frac {\tan ^{-1}\left (\frac {1-\frac {x+3}{\sqrt {-x^2-4 x-3}}}{\sqrt {2}}\right )}{\sqrt {2}}+\frac {\tan ^{-1}\left (\frac {\frac {x+3}{\sqrt {-x^2-4 x-3}}+1}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right )+\frac {1}{2} \sin ^{-1}(x+2) \]

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 12, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {1077, 619, 216, 1028, 986, 12, 1026, 1161, 618, 204, 1027, 206} \begin {gather*} -\frac {\tan ^{-1}\left (\frac {1-\frac {x+3}{\sqrt {-x^2-4 x-3}}}{\sqrt {2}}\right )}{\sqrt {2}}+\frac {\tan ^{-1}\left (\frac {\frac {x+3}{\sqrt {-x^2-4 x-3}}+1}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right )+\frac {1}{2} \sin ^{-1}(x+2) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

ArcSin[2 + x]/2 - ArcTan[(1 - (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]]/Sqrt[2] + ArcTan[(1 + (3 + x)/Sqrt[-3 - 4
*x - x^2])/Sqrt[2]]/Sqrt[2] - ArcTanh[x/Sqrt[-3 - 4*x - x^2]]/2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 986

Int[1/(((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q = Rt
[(c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f), 2]}, Dist[1/(2*q), Int[(c*d - a*f + q + (c*e - b*f)*x)/((a + b*x + c
*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Dist[1/(2*q), Int[(c*d - a*f - q + (c*e - b*f)*x)/((a + b*x + c*x^2)*Sq
rt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] &&
 NeQ[c*e - b*f, 0] && NegQ[b^2 - 4*a*c]

Rule 1026

Int[(x_)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*e,
Subst[Int[(1 - d*x^2)/(c*e - b*f - e*(2*c*d - b*e + 2*a*f)*x^2 + d^2*(c*e - b*f)*x^4), x], x, (1 + ((e + Sqrt[
e^2 - 4*d*f])*x)/(2*d))/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[e^2 - 4*d*f, 0] && EqQ[b*d - a*e, 0]

Rule 1027

Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol]
 :> Dist[g, Subst[Int[1/(a + (c*d - a*f)*x^2), x], x, x/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f,
 g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[b*d - a*e, 0] && EqQ[2*h*d - g*e, 0]

Rule 1028

Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol]
 :> -Dist[(2*h*d - g*e)/e, Int[1/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] + Dist[h/e, Int[(2*d + e*x)
/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0
] && NeQ[e^2 - 4*d*f, 0] && EqQ[b*d - a*e, 0] && NeQ[2*h*d - g*e, 0]

Rule 1077

Int[((A_.) + (C_.)*(x_)^2)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Sym
bol] :> Dist[C/c, Int[1/Sqrt[d + e*x + f*x^2], x], x] + Dist[1/c, Int[(A*c - a*C - b*C*x)/((a + b*x + c*x^2)*S
qrt[d + e*x + f*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, A, C}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f,
 0]

Rule 1161

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(2*d)/e - b/c, 2]},
Dist[e/(2*c), Int[1/Simp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /
; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[(2*d)/e - b/c, 0] || ( !Lt
Q[(2*d)/e - b/c, 0] && EqQ[d - e*Rt[a/c, 2], 0]))

Rubi steps

\begin {align*} \int \frac {x^2}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx &=\frac {1}{2} \int \frac {1}{\sqrt {-3-4 x-x^2}} \, dx+\frac {1}{2} \int \frac {-3-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\\ &=-\left (\frac {1}{4} \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{4}}} \, dx,x,-4-2 x\right )\right )+\frac {1}{2} \int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx+\frac {3}{2} \int \frac {1}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\\ &=\frac {1}{2} \sin ^{-1}(2+x)-\frac {1}{4} \int \frac {-6-4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx+\frac {1}{4} \int -\frac {4 x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx-3 \operatorname {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ &=\frac {1}{2} \sin ^{-1}(2+x)-\tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {3}{2} \operatorname {Subst}\left (\int \frac {1}{3-3 x^2} \, dx,x,\frac {x}{\sqrt {-3-4 x-x^2}}\right )-\int \frac {x}{\sqrt {-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\\ &=\frac {1}{2} \sin ^{-1}(2+x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )-8 \operatorname {Subst}\left (\int \frac {1+3 x^2}{-4-8 x^2-36 x^4} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )\\ &=\frac {1}{2} \sin ^{-1}(2+x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )+\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{3}-\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )+\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{3}+\frac {2 x}{3}+x^2} \, dx,x,\frac {1+\frac {x}{3}}{\sqrt {-3-4 x-x^2}}\right )\\ &=\frac {1}{2} \sin ^{-1}(2+x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )-\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (-1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )-\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{-\frac {8}{9}-x^2} \, dx,x,\frac {2}{3} \left (1+\frac {3+x}{\sqrt {-3-4 x-x^2}}\right )\right )\\ &=\frac {1}{2} \sin ^{-1}(2+x)-\frac {\tan ^{-1}\left (\frac {1-\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )}{\sqrt {2}}+\frac {\tan ^{-1}\left (\frac {1+\frac {3+x}{\sqrt {-3-4 x-x^2}}}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-3-4 x-x^2}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.19, size = 159, normalized size = 1.62 \begin {gather*} \frac {1}{4} \left (-i \sqrt {1-2 i \sqrt {2}} \tanh ^{-1}\left (\frac {i \sqrt {2} x+2 x+2 i \sqrt {2}+2}{\sqrt {2-4 i \sqrt {2}} \sqrt {-x^2-4 x-3}}\right )+i \sqrt {1+2 i \sqrt {2}} \tanh ^{-1}\left (\frac {\left (2-i \sqrt {2}\right ) x-2 i \sqrt {2}+2}{\sqrt {2+4 i \sqrt {2}} \sqrt {-x^2-4 x-3}}\right )+2 \sin ^{-1}(x+2)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

(2*ArcSin[2 + x] - I*Sqrt[1 - (2*I)*Sqrt[2]]*ArcTanh[(2 + (2*I)*Sqrt[2] + 2*x + I*Sqrt[2]*x)/(Sqrt[2 - (4*I)*S
qrt[2]]*Sqrt[-3 - 4*x - x^2])] + I*Sqrt[1 + (2*I)*Sqrt[2]]*ArcTanh[(2 - (2*I)*Sqrt[2] + (2 - I*Sqrt[2])*x)/(Sq
rt[2 + (4*I)*Sqrt[2]]*Sqrt[-3 - 4*x - x^2])])/4

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.33, size = 82, normalized size = 0.84 \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {2} x+\frac {3}{\sqrt {2}}}{\sqrt {-x^2-4 x-3}}\right )}{\sqrt {2}}-\tan ^{-1}\left (\frac {\sqrt {-x^2-4 x-3}}{x+3}\right )-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {-x^2-4 x-3}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[x^2/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

ArcTan[(3/Sqrt[2] + Sqrt[2]*x)/Sqrt[-3 - 4*x - x^2]]/Sqrt[2] - ArcTan[Sqrt[-3 - 4*x - x^2]/(3 + x)] - ArcTanh[
x/Sqrt[-3 - 4*x - x^2]]/2

________________________________________________________________________________________

fricas [A]  time = 1.04, size = 161, normalized size = 1.64 \begin {gather*} -\frac {1}{4} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} x + 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) - \frac {1}{4} \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} x - 3 \, \sqrt {2} \sqrt {-x^{2} - 4 \, x - 3}}{2 \, {\left (2 \, x + 3\right )}}\right ) - \frac {1}{2} \, \arctan \left (\frac {\sqrt {-x^{2} - 4 \, x - 3} {\left (x + 2\right )}}{x^{2} + 4 \, x + 3}\right ) + \frac {1}{8} \, \log \left (-\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) - \frac {1}{8} \, \log \left (\frac {2 \, \sqrt {-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x, algorithm="fricas")

[Out]

-1/4*sqrt(2)*arctan(1/2*(sqrt(2)*x + 3*sqrt(2)*sqrt(-x^2 - 4*x - 3))/(2*x + 3)) - 1/4*sqrt(2)*arctan(-1/2*(sqr
t(2)*x - 3*sqrt(2)*sqrt(-x^2 - 4*x - 3))/(2*x + 3)) - 1/2*arctan(sqrt(-x^2 - 4*x - 3)*(x + 2)/(x^2 + 4*x + 3))
 + 1/8*log(-(2*sqrt(-x^2 - 4*x - 3)*x + 4*x + 3)/x^2) - 1/8*log((2*sqrt(-x^2 - 4*x - 3)*x - 4*x - 3)/x^2)

________________________________________________________________________________________

giac [B]  time = 0.23, size = 171, normalized size = 1.74 \begin {gather*} -\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) - \frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\frac {\sqrt {-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac {1}{2} \, \arcsin \left (x + 2\right ) - \frac {1}{4} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {3 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) + \frac {1}{4} \, \log \left (\frac {2 \, {\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac {{\left (\sqrt {-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x, algorithm="giac")

[Out]

-1/2*sqrt(2)*arctan(1/2*sqrt(2)*(3*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) - 1/2*sqrt(2)*arctan(1/2*sqrt(2)*(
(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) + 1/2*arcsin(x + 2) - 1/4*log(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) +
3*(sqrt(-x^2 - 4*x - 3) - 1)^2/(x + 2)^2 + 1) + 1/4*log(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + (sqrt(-x^2 - 4*
x - 3) - 1)^2/(x + 2)^2 + 3)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 130, normalized size = 1.33 \begin {gather*} \frac {\arcsin \left (x +2\right )}{2}-\frac {\sqrt {3}\, \sqrt {4}\, \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \left (-\arctanh \left (\frac {3 x}{\left (-x -\frac {3}{2}\right ) \sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}}\right )+\sqrt {2}\, \arctan \left (\frac {\sqrt {\frac {3 x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-12}\, \sqrt {2}}{6}\right )\right )}{12 \sqrt {\frac {\frac {x^{2}}{\left (-x -\frac {3}{2}\right )^{2}}-4}{\left (\frac {x}{-x -\frac {3}{2}}+1\right )^{2}}}\, \left (\frac {x}{-x -\frac {3}{2}}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x)

[Out]

1/2*arcsin(x+2)-1/12*3^(1/2)*4^(1/2)*(3/(-x-3/2)^2*x^2-12)^(1/2)*(2^(1/2)*arctan(1/6*(3/(-x-3/2)^2*x^2-12)^(1/
2)*2^(1/2))-arctanh(3/(-x-3/2)/(3/(-x-3/2)^2*x^2-12)^(1/2)*x))/((1/(-x-3/2)^2*x^2-4)/(1/(-x-3/2)*x+1)^2)^(1/2)
/(1/(-x-3/2)*x+1)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2}}{{\left (2 \, x^{2} + 4 \, x + 3\right )} \sqrt {-x^{2} - 4 \, x - 3}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x, algorithm="maxima")

[Out]

integrate(x^2/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2}{\sqrt {-x^2-4\,x-3}\,\left (2\,x^2+4\,x+3\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/((- 4*x - x^2 - 3)^(1/2)*(4*x + 2*x^2 + 3)),x)

[Out]

int(x^2/((- 4*x - x^2 - 3)^(1/2)*(4*x + 2*x^2 + 3)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2}}{\sqrt {- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/(2*x**2+4*x+3)/(-x**2-4*x-3)**(1/2),x)

[Out]

Integral(x**2/(sqrt(-(x + 1)*(x + 3))*(2*x**2 + 4*x + 3)), x)

________________________________________________________________________________________